import QtQuick 2.6
import Qt.labs.controls 1.0
import QtQuick.Layouts 1.3
import "../template" as TM

TM.Navigator {
    //property alias title: bar.currentItem.text
    title: "首页"
//   Component.onCompleted: {
//       if (usinfo.role == "t" && tabBar.count !== 3) {
//       var newObject = Qt.createQmlObject('import QtQuick 2.4; import Qt.labs.controls 1.0;TabButton {text: "成员"}',
//                                           tabBar);

//       tabBar.addItem(newObject)
//       }
//   }
    StackLayout {
        id: view

        currentIndex: tabBar.currentIndex
        anchors.fill: parent

        ContentInfoPage {}
        ContentChatPage{}
    //   ContentMemberPage{}
    }

    footer: TabBar {
        id: tabBar

        currentIndex: 0

        TabButton {
            text: qsTr("资讯")
        }
        TabButton {
            text: qsTr("聊天")
        }

    }

}
